import React, { useState, useEffect } from 'react';
import { connect } from 'dva';
import { Icon, Modal, Form, Input, Select, Upload, Button } from 'antd';
//@ts-ignore
import LzEditor from 'react-lz-editor';
import Service from '@/public/http/services';
import style from './index.css';
const { TextArea } = Input;
const { Option } = Select;
const Delivery: React.FC<any> = ({ formData,visible,title, onOK, onCancel, form, dispatch }) => {

  useEffect(() => {

  }, [visible])


  const formItemLayout = {
    labelCol: { span: 5 },
    wrapperCol: { span: 14 },
  }

  const { getFieldDecorator } = form;
  return (
    <Modal
      visible={visible}
      title={title}
      cancelText={'取消'}
      okText={'确定'}
      onOk={() => {
        onOK && onOK(form)
      }}
      onCancel={() => {
        onCancel(form)
      }}
      width={'65%'}
    >
      <div>

        <Form.Item {...formItemLayout} label={'快递单号'}>
          {
            getFieldDecorator('deliverOrder', {
              initialValue: formData.groupName,
              rules: [{ required: true, message: '请输入快递单号' }],
            })(<Input className={style.w220} placeholder={'请输入请输入快递单号'} />)
          }
        </Form.Item>
      </div>

    </Modal>
  );
}
const WrappedCreateModal = Form.create<any>({ name: 'modalForm' })(Delivery);
export default connect((state: any) => {
  return {
  }
})(WrappedCreateModal);
